local heng__zhenfen = fk.CreateSkill {
  name = "heng__zhenfen",
}

Fk:loadTranslationTable{
  ["heng__zhenfen"] = "振奋",
  [":heng__zhenfen"] = "当其他角色进入濒死状态时，你可以令其摸一张牌。",
  ["#heng__zhenfen-trigger"] = "振奋：是否令 %dest 摸一张牌？",
}

heng__zhenfen:addEffect(fk.EnterDying, {
  anim_type = "support",
  
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(heng__zhenfen.name)
    and target ~= player
  end,
  
  on_cost = function(self, event, target, player, data)
    if player.room:askToSkillInvoke(player, {
      skill_name = heng__zhenfen.name,
      prompt = "#heng__zhenfen-trigger::" .. target.id,
    }) then
      event:setCostData(self, {tos = {target}})
      return true
    end
    return false
  end,
  
  on_use = function(self, event, target, player, data)
    event:getCostData(self).tos[1]:drawCards(1, heng__zhenfen.name)
  end,
})

return heng__zhenfen